<template>
  <component :is="currentLayoutComponent" />
</template>

<script setup lang="ts">
import { computed } from 'vue'
import { useThemeStore } from '@/stores/theme'
import DashboardLayout from './DashboardLayout.vue'
import DashboardLayoutHorizontal from './DashboardLayoutHorizontal.vue'

const themeStore = useThemeStore()

// 根据布局模式动态选择组件
const currentLayoutComponent = computed(() => {
  return themeStore.layoutMode === 'horizontal' 
    ? DashboardLayoutHorizontal 
    : DashboardLayout
})
</script>
